package com.hnust.root.dao.mapper.wx;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnust.root.dao.entity.domain.forward.WxUserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

//用户详细信息
@Mapper
@Repository
public interface WxUserInfoMapper extends BaseMapper<WxUserInfo> {

    //通过open_id更新用户的某一个属性
    @Update("update user_info set ${key} = #{value} where open_id = #{openId}")
    int updateUserInfoByKey(@Param("openId") String openId, @Param("key") String key, @Param("value") String value);
}
